import _axios from "@/plugins/axios";

let baseUrlPrefix = "/engine/config/rulesEngine";

export const fetchRulesEngineConfig = (currentPage, pageSize) => {
  return _axios.get(baseUrlPrefix + '/pageList', {
    "params": {
      currentPage: currentPage,
      pageSize: pageSize
    }
  })
}

export const getRulesEngineConfig = (id) => {
  return _axios.get(baseUrlPrefix + '/' + id)
}

export const addRulesEngineConfig = params => {
  return _axios.post(baseUrlPrefix + '/add', params)
}

export const changeEngineExpansionConfig = (id, expansionConfig) => {
  return _axios.post(baseUrlPrefix + '/changeEngineExpansionConfig', {
    id: id,
    expansionConfig: expansionConfig
  })

}

